package com.navinfo.opentsp.platform.computing.analysis.entity.coldChain;

import lombok.Data;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;

@Data
public class OutData {
    private Long tid;
    private List<ColdChainEvent> outEvents = new ArrayList<>();

    private Integer preCargoBoxTemperature1;
    private Integer preCargoBoxTemperature2;
    private Integer preCargoBoxTemperature3;
    private Integer preCargoBoxTemperature4;
    private Integer preContainerHumidity1;
    private Integer preContainerHumidity2;
    private Integer preContainerHumidity3;
    private Integer preContainerHumidity4;
    private Integer preCargoBoxDoorStatus1;
    private Integer preCargoBoxDoorStatus2;
    private Integer preCargoBoxDoorStatus3;

    private Timestamp preCargoBoxTemperature1St;
    private Timestamp preCargoBoxTemperature2St;
    private Timestamp preCargoBoxTemperature3St;
    private Timestamp preCargoBoxTemperature4St;
    private Timestamp preContainerHumidity1St;
    private Timestamp preContainerHumidity2St;
    private Timestamp preContainerHumidity3St;
    private Timestamp preContainerHumidity4St;
    private Timestamp preCargoBoxDoorStatus1St;
    private Timestamp preCargoBoxDoorStatus2St;
    private Timestamp preCargoBoxDoorStatus3St;

    private Integer preCargoBoxTemperature1Lat;
    private Integer preCargoBoxTemperature2Lat;
    private Integer preCargoBoxTemperature3Lat;
    private Integer preCargoBoxTemperature4Lat;
    private Integer preContainerHumidity1Lat;
    private Integer preContainerHumidity2Lat;
    private Integer preContainerHumidity3Lat;
    private Integer preContainerHumidity4Lat;
    private Integer preCargoBoxDoorStatus1Lat;
    private Integer preCargoBoxDoorStatus2Lat;
    private Integer preCargoBoxDoorStatus3Lat;

    private Integer preCargoBoxTemperature1Lon;
    private Integer preCargoBoxTemperature2Lon;
    private Integer preCargoBoxTemperature3Lon;
    private Integer preCargoBoxTemperature4Lon;
    private Integer preContainerHumidity1Lon;
    private Integer preContainerHumidity2Lon;
    private Integer preContainerHumidity3Lon;
    private Integer preContainerHumidity4Lon;
    private Integer preCargoBoxDoorStatus1Lon;
    private Integer preCargoBoxDoorStatus2Lon;
    private Integer preCargoBoxDoorStatus3Lon;

    public void shift(PointForColdChain point) {
        preCargoBoxTemperature1 = point.getCargoboxtemperature1();
        preCargoBoxTemperature2 = point.getCargoboxtemperature2();
        preCargoBoxTemperature3 = point.getCargoboxtemperature3();
        preCargoBoxTemperature4 = point.getCargoboxtemperature4();
        preContainerHumidity1 = point.getContainerhumidity1();
        preContainerHumidity2 = point.getContainerhumidity2();
        preContainerHumidity3 = point.getContainerhumidity3();
        preContainerHumidity4 = point.getContainerhumidity4();
        preCargoBoxDoorStatus1 = point.getCargoboxdoorstatus1();
        preCargoBoxDoorStatus2 = point.getCargoboxdoorstatus2();
        preCargoBoxDoorStatus3 = point.getCargoboxdoorstatus3();
    }
}
